package homework.organizer;

import homework.entities.Tema;
import android.app.Activity;
import android.os.Bundle;
import android.widget.TextView;

public class HomeworkDetails extends Activity {

	private Tema homework;
	
	@Override
	public void onCreate(Bundle savedInstanceState){
		super.onCreate(savedInstanceState);
		setContentView(R.layout.homework_details);
		
		Bundle data = getIntent().getBundleExtra("data");
		Tema t = (Tema)data.get("homework");
		if(t != null){
			
			homework = t;
			
		}
		
		
		TextView displayNameTextView = (TextView) findViewById(R.id.displayNameTextView);
		displayNameTextView.setText("Display name: " + homework.getDisplayName());
		
		TextView titleTextView = (TextView) findViewById(R.id.titleTextView);
		titleTextView.setText("Title: " + homework.getTitle());
		
		TextView subjectTextView = (TextView) findViewById(R.id.subjectTextView);
		subjectTextView.setText("Subject: " + homework.getSubject());
		
		TextView deadlineTextView = (TextView) findViewById(R.id.deadlineTextView);
		deadlineTextView.setText("Deadline: " + homework.getDeadline());
		
		TextView notesTextView = (TextView) findViewById(R.id.notesTextView);
		notesTextView.setText("Notes: " + homework.getNotes());
		
	}
	
}
